1. Field of the Invention
The present invention relates to a semiconductor magnetic sensor for detecting a magnetic flux density of a magnetic field applied from an outside.
2. Description of the Related Art
At present, a hall element for magnetoelectric conversion is used as a sensor. For example, the hall element is used as a sensor for detecting opening and closing of a flip type mobile phone. The hall element of this case functions as a contactless switch.
A description is given of a semiconductor magnetic sensor having the hall element mounted therein. FIG. 4 is a plan view of a semiconductor magnetic sensor of a related art.
A terminal C301 of a hall element 300 is connected to a drain of each of transistors MP301 via a wiring N303. A terminal C302 of the hall element 300 is connected to a drain of each of transistors MP302 via a wiring N304. A terminal C303 of the hall element 300 is connected to a drain of each of transistors MN301 via a wiring N305. A terminal C304 of the hall element 300 is connected to a drain of each of transistors MN302 via a wiring N306. A source of each of the transistors MP301 and the transistors MP302 is connected to a power supply terminal N301. A source of each of the transistors MN301 and the transistors MN302 is connected to a ground terminal N302. A gate of each of the transistors MP301, the transistors MP302, the transistors MN301, and the transistors MN302 is connected to a logic circuit mounted in the same semiconductor device. In addition, the terminal C301, the terminal C302, the terminal C303, and the terminal C304 are each connected to a sampling circuit mounted in the same semiconductor device.
The hall element 300 performs magnetoelectric conversion to detect a magnetic flux density of a magnetic field of a magnet or the like, which is applied from an outside. In order to change a current path in the hall element 300, the logic circuit outputs control signals for performing on/off control of each of the transistors MP301, the transistors MP302, the transistors MN301, and the transistors MN302. The transistors MP301, the transistors MP302, the transistors MN301, and the transistors MN302 each drive the hall element 300. The sampling circuit samples a voltage generated between the terminal C301 and the terminal C303 or a voltage generated between the terminal C302 and the terminal C304.
In this case, as shown in FIG. 4, the wiring N304 is routed near the hall element 300, and the wiring N305 is also routed near the hall element 300.
Note that, as the magnetic sensor including the wirings as shown in FIG. 4, there is disclosed a technology proposed in JP 2000-147080 A.
Incidentally, magnetic fields are generated around currents flowing through the wirings according to Biot-Savart law. Those magnetic fields are interlinked with the hall element 300.
As a result, though the hall element 300 should detect only the magnetic flux density of the magnetic field of a magnet or the like, which is applied from the outside, the hall element 300 detects also the magnetic flux density of each of the magnetic fields generated by the currents flowing through the wirings. Accordingly, the semiconductor magnetic sensor does not accurately detect the magnetic flux density of the magnetic field applied from the outside.